<style>
  .truncate .md-button {
    max-width: 350px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
</style>

<md-menu-content class="md-kylo-theme" role="menu">

  <md-menu-item ng-if="selection && value != null">
    <md-button ng-click="header.delegate.findRowsContaining(selection, header)">Find rows containing '{{ selectionDisplay }}'</md-button>
  </md-menu-item>
  <md-menu-item ng-if="value != null && !selection">
    <md-button ng-click="header.delegate.findRowsEqualTo(value, header)">Find rows equal to '{{ displayValue }}'</md-button>
  </md-menu-item>
  <md-menu-item ng-if="value != null  && (header.delegate.dataCategory == DataCategory.DATETIME || header.delegate.dataCategory == DataCategory.NUMERIC)">
    <md-button ng-click="header.delegate.findRowsLessThan(value, header)">Find rows less than '{{ displayValue }}'</md-button>
  </md-menu-item>
  <md-menu-item ng-if="value != null  && (header.delegate.dataCategory == DataCategory.DATETIME || header.delegate.dataCategory == DataCategory.NUMERIC)">
    <md-button ng-click="header.delegate.findRowsGreaterThan(value, header)">Find rows greater than '{{ displayValue }}'</md-button>
  </md-menu-item>
  <md-menu-item ng-if="value == null ">
    <md-button ng-click="header.delegate.findNullRows(header)">Find rows with empty values</md-button>
  </md-menu-item>

  <md-menu-divider ng-if="value != null && !selection"></md-menu-divider>
  <md-menu-item ng-if="value != null && !selection ">
    <md-button ng-click="header.delegate.replaceValueEqualTo(value, header, table)">Replace values equal to '{{ displayValue }}'...</md-button>
  </md-menu-item>
  <md-menu-item ng-if="value == null">
    <md-button ng-click="header.delegate.replaceValueEqualTo(value, header, table)">Replace empty values...</md-button>
  </md-menu-item>
  <md-menu-item ng-if="value != null && !selection">
    <md-button ng-click="header.delegate.clearRowsEquals(value, header, table)">Clear values equal to '{{displayValue}}'</md-button>
  </md-menu-item>

  <md-menu-divider ng-if="selection && value != null"></md-menu-divider>
  <md-menu-item ng-if="selection && value != null">
    <md-button ng-click="header.delegate.splitOn(selection, header, table)">Split text on '{{ selectionDisplay }}' into array</md-button>
  </md-menu-item>
  <md-menu-item ng-if="selection && selection.length > 0">
    <md-button ng-click="header.delegate.stripValueContaining(selection, header, table)">Strip characters matching '{{ selectionDisplay }}'</md-button>
  </md-menu-item>
  <md-menu-item ng-if="range && value != null && selection &&  selection.length > 0">
    <md-button ng-click="header.delegate.extractStringAtSelectedIndex(range, header, table)">Extract text between index {{ range.startOffset }} to {{ range.endOffset }}</md-button>
  </md-menu-item>
  <md-menu-item ng-if="range && value != null && selection && selection.length > 1">
    <md-button ng-click="header.delegate.extractRegex(selection, header, table)">Regex extract between selection</md-button>
  </md-menu-item>

  <md-menu-divider></md-menu-divider>
  <md-menu-item ng-if="value != null && !selection">
    <md-button ng-click="header.delegate.deleteRowsEqualTo(value, header)">Delete rows equal to {{ displayValue }}</md-button>
  </md-menu-item>
  <md-menu-item ng-if="selection && value != null">
    <md-button ng-click="header.delegate.deleteRowsContaining(selection, header)">Delete rows containing '{{ selectionDisplay }}'</md-button>
  </md-menu-item>
  <md-menu-item ng-if="value == null">
    <md-button ng-click="header.delegate.deleteNullRows(header)">Delete rows with empty values</md-button>
  </md-menu-item>

  <!--
  <md-menu-item ng-if="value !== null && (header.delegate.dataCategory == DataCategory.DATETIME || header.delegate.dataCategory == DataCategory.NUMERIC)">
    <md-button ng-click="header.delegate.deleteRowsLessThan(value, header)">Delete rows less than {{ displayValue }}</md-button>
  </md-menu-item>
  <md-menu-item ng-if="value !== null && (header.delegate.dataCategory == DataCategory.DATETIME || header.delegate.dataCategory == DataCategory.NUMERIC)">
    <md-button ng-click="header.delegate.deleteRowsGreaterThan(value, header)">Delete rows greater than {{ displayValue }}</md-button>
  </md-menu-item>
  -->

</md-menu-content>
